package com.csjung.games.gamenori.client.desktop;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HasText;
import com.google.gwt.user.client.ui.Widget;

import com.csjung.games.gamenori.client.presenter.matching.MatchingView;

public class DesktopMatchingView extends Composite implements MatchingView {

  private static DesktopMatchingViewUiBinder uiBinder = GWT
      .create(DesktopMatchingViewUiBinder.class);

  interface DesktopMatchingViewUiBinder extends UiBinder<Widget, DesktopMatchingView> {
  }
  
  /**
   * The presenter for this view.
   */
  private Presenter presenter;

  public DesktopMatchingView() {
    initWidget(uiBinder.createAndBindUi(this));
  }

  @UiField
  Button button;

  public DesktopMatchingView(String firstName) {
    initWidget(uiBinder.createAndBindUi(this));
    button.setText(firstName);
  }

  @UiHandler("button")
  void onClick(ClickEvent e) {
    Window.alert("Hello!");
  }

  @Override
  public void setPresenter(Presenter presenter) {
    this.presenter = presenter;
    
  }
  
}
